package com.baizhi.tests;

import com.baizhi.dao.UserDAO;
import com.baizhi.dao.UserDAOImpl;
import com.baizhi.entity.User;
import org.junit.Test;

public class TestUser {
    private UserDAO ud = new UserDAOImpl();
    private User user = new User();
    @Test
    public void login(){
        User sbc = ud.queryByUserAndPassword("sbc","123");
        System.out.println(sbc);
    }
    @Test
    public void insert(){
        user.setName("zses");
        user.setAccount("zses");
        user.setPassword("123");
        user.setSex("男");
        user.setQuestion("w");
        user.setAnswer("s");
        user.setIntroduce("b");
        ud.register(user);
    }
}
